package com.lkl.hystrixdemo.order.aspect.handProxy;

import com.lkl.hystrixdemo.order.aspect.handProxy.service.User;
import com.lkl.hystrixdemo.order.aspect.handProxy.service.UserImpl;

import java.lang.reflect.Proxy;

public class TestProxy {

    public static void main(String[] args) {
        ProxyHandler proxyHandler = new ProxyHandler(new UserImpl());
        User user =  (User) Proxy.newProxyInstance(TestProxy.class.getClassLoader(), UserImpl.class.getInterfaces(), proxyHandler);
        user.say();
    }
}


